<?php
namespace App\Libs\Captcha\Algorithms;
class Numeric extends \App\Libs\Base\Singleton implements AlgorithmInterface
{
    public function generate($length = 6) {
        $res = array();
        for ($i = 0; $i < $length; $i ++) {
            $res[] = mt_rand(0, 9);
        }
        $res = join('', $res);
        return array('captcha' => $res, 'check' => strtolower($res));
    }   
}
